package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.reggie.entity.Employee;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author Lff
 * @date 2022/2/25
 */
public interface EmployeeService extends IService<Employee> {

    /**
     * 用户登录代码
     * 根据用户名查询返回一个Emp对象
     * 根据Emp做具体的登录状态判断
     * @param employee
     * @return
     */
    Employee login(Employee employee);

    /**
     * 分页查询
     * @param page
     * @param pageSize
     * @param name
     * @return
     */
    Page<Employee> getAllByPage(Integer page, Integer pageSize, String name);

    /**
     * 添加用户
     * @param employee
     * @return
     */
    boolean addEmp(Employee employee);

    /**
     * 修改
     * @param employee
     * @return
     */
    boolean updateEmp(Employee employee);
}
